<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>系统管理后台 </title>


<style>
*{ margin:0px; padding:0px;}
#top,#content,#footer{width:1024px;  margin:0 auto;}
#top{ background:url(./images/1_01.gif); height:125px}
#content{ background:url(./images/1_02.gif) no-repeat top center; height:496px;}
#footer{ background:url(./images/1_03.gif) no-repeat bottom center;height:144px;}

table{color:#ff8500; font-weight:bold; font-size:12px;}
.input{ border:1px solid #ff8500; width:120px}
</style>
</head>
<body>
<c:if test="${!empty message}">
  	<script type="text/javascript">
  		var msg="${message}";
  		alert(msg);
  	</script>
  	<c:remove var="message"/>
  </c:if>
<div id="top">
</div>
<div id="content">
<div  style=" width:501px; height:475px; margin:0 auto; background:url(./images/1_05.gif); position:relative">
<div style="position:absolute; left:100px; top:160px; width:350px; height:160px;">
<form action="<c:url value='/admin.do?method=login' />" method="post" name="form" onsubmit="return check_form(form)">
<table width="100%" cellpadding="0" cellspacing="0" >
    <tr height="50px" >
        <td align="right">用户名：</td>
        <td><input name="username" type="text" class="input" /></td>
    </tr>
      <tr height="50px" >
       <td align="right">密 码：</td>
        <td><input name="pwd" type="password" class="input"  /></td>
    </tr>
    
     <tr height="50px">
        <td colspan="2"><div style="text-align:center"><input style=" width:72px; height:25px; background:url(./images/1_06.gif); border:none;cursor: hand" type="submit" value=""></input>&nbsp;&nbsp;<input style=" width:72px; height:25px; background:url(./images/1_07.gif); border:none;cursor: hand" type="reset" value=""></input></div></td>
    </tr>
</table>
</form>
</div>
</div>
</div>
<div id="footer">
</div>
<script language="javascript" type="text/javascript">
function check_form(form)
{
	if (document.form.username.value=='')
	{
	alert('用户名不能为空');
	return false;}
	else if(document.form.pwd.value=='')
	{
	alert('密码不能为空'); 
	return false;
	}
}
</script>
</body>
</html>
